package com.wuwei.jy.Service;

import java.util.Random;

import com.wuwei.jy.dao.g.UserMapper;
import com.wuwei.jy.domain.g.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class MUserSv {

	@Autowired
	private UserMapper mUserMapper;

	@SuppressWarnings("deprecation")
	public String RegesterUser(User u) {





			return "success " + u.getId();



	}

	public String generateNickName() {

		return "用戶" + G6n();

	}

	public String G6n() {
		int d = 0;
		Random r = new Random();
		while (true) {
			int x = r.nextInt(999999);
			if (x > 99999) {
				d = x;
				break;
			} else
				continue;
		}
		return d + "";

	}

}
